home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / libguide.lha / LibGuide / HDLibraryCheck < prev    next >
Text File  |  1997-12-23  |  3KB  |  84 lines

  1. /* Library Check on your HD
  2.    V1.1 - 12/23/97 - © Age*/
  3.  
  4. if ~show('L',"rexxreqtools.library") then addlib('rexxreqtools.library',0,-30,0)
  5.  
  6. say "This ARexx-Script checks the libraries outside of the drawer LIBS:"
  7. say "              V1.1 - 12/23/97 - © Heiko Schröder"
  8. say "------------------------------------------------------------------"
  9. say ""
  10. say "This hard disc check can take a long time (HD-size specific)."
  11. say "Do you want to continue (Y/N)?"; Pull Keyword
  12. If upper(Keyword)~="Y" then exit
  13.  
  14. Device = rtfilerequest(,,"Pick a device",,"rtfi_volumerequest=vreqf_noassigns")
  15. IF Device = "" then do 
  16.    echo "Cancel"
  17.    exit
  18. END
  19.  
  20. say "I'm looking for libraries on "||Device
  21. say "Please wait some minutes... Thanks."
  22. if Device~="" then Device=d2c(34)||Device||d2c(34)
  23.  
  24. address command 'list ' device || 'p=#?.library to=Ram:HDLibCheck files lformat %s%s all'
  25.  
  26. say "Now I'm ready... Thanks for waiting."
  27. say ""
  28. say "Now i create the HDList.dvc for DVC."
  29.  
  30. Open("HDL","Ram:HDList.dvc","W")
  31. Writeln("HDL","DVC1 (Don't change this line!)")
  32. Writeln("HDL",";$VER: HDList.dvc by Heiko Schröder from LibGuide")
  33. Writeln("HDL",";$EML: Heiko Schroeder <age@thepentagon.com>")
  34. Writeln("HDL","")
  35.  
  36. IF ~OPEN('Infile',"ram:HDLibCheck","R") THEN EXIT 10      /*List-Result*/
  37.  
  38. DO WHILE 1                /* DO Forever - We'll EXIT on EOF) */
  39.    Libfile = ReadLn('Infile')
  40.     IF EOF('Infile') THEN leave
  41.    say Libfile
  42.  
  43.    pos = max(pos(":",Libfile),lastpos("/",Libfile))   /*#?.library*/
  44.    temp=Delstr(Libfile,1,pos)
  45.  
  46.    pos     =LastPos(".library",temp)                /* Version */
  47.    LibfileK=Delstr(temp,pos+8)
  48.  
  49.    address command "search >ram:ListSearch search :"||LibfileK||" nonum Scripts/LibList.dvc"
  50.    Open("list","ram:Listsearch","R")
  51.    ScriptLib=readln("list")
  52.    Close("list")
  53.  
  54.    If ScriptLib="" then do
  55.       address command "search >ram:ListSearch search /"||LibfileK||" nonum Scripts/LibList.dvc"
  56.       Open("list","ram:Listsearch","R")
  57.       ScriptLib=readln("list")
  58.       Close("list")
  59.    End
  60.  
  61.    If ScriptLib~="" then do
  62.       pos = max(pos(":",ScriptLib),lastpos("/",ScriptLib))   /*#?.library*/
  63.       temp=Delstr(ScriptLib,1,pos)
  64.  
  65.       pos    =LastPos(".library",temp)                /* Version */
  66.       ScriptVers=Delstr(temp,1,pos+8)
  67.       writeln("HDL",Libfile||" "||ScriptVers)
  68.    end
  69.    else writeln("HDL",Libfile||" 0.0")
  70. End
  71.  
  72. close("Infile")
  73. close("HDL")
  74. say "DVC checks the version strings of your libraries."
  75. address command "DVC list=Ram:HDList.dvc"
  76.  
  77. say ""
  78. say "You can find a list of your libraries at Ram:HDLibCheck."
  79. address command "delete ram:HDList.dvc QUIET"
  80. address command "delete ram:ListSearch QUIET"
  81. say "Press »Return« to end."
  82. PARSE PULL Keyword
  83. exit
  84.